<template>
<articleTable ref="timer"></articleTable>
	<img :src="'@/../static/img/bgIcon/article.svg'"
		style="opacity: 0.3;width: 45%;position: absolute;top: 50%;right: -3%;" />
	<Navigator :fixed="true" background-color="transparent" status-bar left-icon="back" left-text="返回" class="absolute">
	</Navigator>

	<view @touchend="handleEnd" class="wh100p "
		style="justify-content: center; align-items: center;background: linear-gradient(90deg, #0078BB 0%, #003E94 100%);overflow: hidden;">

		<scroll-view :scroll-top="scrollTop" :scroll-y="true" class="w100p  flex-column;mt30"
			style="padding: 20rpx;width: 100%;padding:1% 6%;box-sizing: border-box;height: 98%;margin-top: 1%;">
			<u-parse :content="articleData.content??''" class="cust" style="color:white" />

		</scroll-view>

	</view>
	<view @touchend="handleEnd" style="width: 1200px;margin: 0 auto;" v-if="false">
		<view class="gui-bg-white gui-dark-bg-level-3 gui-padding mt50" style="padding: 50px 50px;">
			<rich-text :nodes="nodes"></rich-text>
		</view>
		<view class="gui-margin-top gui-flex gui-row gui-wrap gui-justify-content-center">
			<view class="gui-block gui-dark-bg-level-3" style="max-width: 450px;min-width: 300px;"
				v-for="(item, index) of cnUser" :key="index">
				<uni-card style="border-radius: 15rpx;" :is-shadow="true">
					<view class="gui-card-view gui-margin-top">
						<view class="gui-card-body gui-border-b gui-flex gui-rows gui-nowrap"
							style="padding-bottom:10rpx ;">
							<view class="flex">
								<view>
									<image class="gui-list-image ucenter-face-image" :src="item?.avatar"
										mode="aspectFill">
									</image>
								</view>
								<view class="flex-column" style="padding:0rpx 40rpx;">
									<text class="cnName"
										style="font-size: 32rpx;font-weight: 600;line-height: 60rpx;">{{item?.realName}}</text>
									<text class="gui-card-text gui-block gui-third-text"
										style="line-height: 40rpx;">邮箱：{{item?.email??'暂无'}}</text>
									<text class="gui-card-text gui-block gui-third-text"
										style="line-height: 40rpx;">电话：{{item?.phone??'暂无'}}</text>
									<text class="gui-card-text gui-block gui-third-text"
										style="line-height: 40rpx;">性别：{{item?.sex??'暂无'}}</text>

								</view>
							</view>
						</view>
					</view>

					<view class="pa10">
						<view class="uni-body gui-ellipsis">简介：{{item.remark}}老师温柔体贴，有不开心的事情就来向我倾诉吧。</view>
					</view>
				</uni-card>
			</view>
		</view>
	</view>

</template>
<script setup>
	import {
		ref,
		onMounted
	} from 'vue'
	import parserHtml from "@/Grace6/js/parserHTML.js";
	import {
		getUserList
	} from '../../api/school.js'
	import {
		getArticles,
		getAllArticlesBytnId
	} from '../../api/article.js'
	const cnUser = ref([])
	const nodes = ref('')
	const articleData = ref('')

	const getData = async () => {
		const {
			data
		} = await getAllArticlesBytnId({
			artModule: 'zxzx',
			artState: true,
			tenantId: uni.getStorageSync('tenantId')
		})
		console.log(data)
		articleData.value = data.data.records[0]
		nodes.value = parserHtml.parserHTML(articleData.value?.content ?? '')
	}
	onMounted(() => {
		// getCnUserList()
		getData()
	})
	const timer = ref(null)
	const handleEnd = () => {
		timer.value.resetTime()
	}
</script>
<style>

</style>